attach Io Surface Ring
Creates a session that renders the map into a ring of IOSurfaces that the library allocates.
Acquire each frame with RenderSessionHandle.acquireFrame(), and get its surface with AcquiredFrameHandle.withIoSurface(). RenderSessionHandle.resize() gives the ring new surfaces of the new size. Attach with RenderDriverKind.CORE_WORKER.
To hand frames to a reader that can't wait on an event, such as Flutter's copyPixelBuffer, attach without GpuSyncKindFlag.METAL_SHARED_EVENT in RenderSessionAttachOptions.producerSyncKinds, so that each frame finishes before you acquire it. Release a frame with GpuSyncKind.CPU_COMPLETE only once the reader has finished with its surface.
See mln_map_attach_io_surface_ring in the C API reference.
Errors:
Status.UNSUPPORTEDwhensupportedRenderBackendMask()lacksRenderBackendFlag.METAL.Status.NATIVE_ERRORwhencontextnames no device and the system has no Metal device.